<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-for指令</title>
</head>
<body>
    <div id="app">
        <h6>{{msg}}</h6>
        <ul>
            <li v-for="(name,index) in userList ":key="index">
                {{name}} - {{index}}
            </li>
            
        </ul>
    </div>
</body>
<script src="./js/vue.js"></script>
<script>
    let app = new Vue({
        el: '#app',
        data: {
          msg:"v-for指令",
          userList:['zhangsan','lisi','wangwu']
        }
    })
</script>
</html>